 <#include "admin/common/include/html_head.html"> <#include
"admin/common/include/sysparam.html"> <#include
"admin/common/include/pagination.html">

<!-- BEGIN FORM-->

<div class="alert alert-error " id="screenshoterrTip"
	style="display: none;"></div>

<div class="portlet-body">
	<div class="clearfix">
		<button id="screenshot_add_btn" class="btn blue">
			<i class="icon-plus"></i>&nbsp;&nbsp;新增
		</button>
		<button id="screenshot_del_btn" class="btn blue">
			<i class="icon-trash"></i>&nbsp;&nbsp;删除
		</button>
	</div>
	<br>
	<div id="screenshotShowDiv"></div>
</div>

<script>
	jQuery(document)
			.ready(
					function() {
						var resourceId = '${(resourceId)?if_exists}';
						if (!resourceId) {
							$('#screenshoterrTip').html(
									'暂时不能编辑截图，请先编辑资源基本信息!');
							$('#screenshoterrTip').show();
							$('#screenshot_add_btn').attr('disabled', 'true');
							$('#screenshot_del_btn').attr('disabled', 'true');
						} 
						// 捆绑
						$("#resscreenshotTab").bind("click", function(e) {   
							 e.preventDefault(); 
							 $(this).tab('show'); 
								mainFrame.addArea(
										'${contextPath}/Admin-ResScreenShot-show.action?_QUERY_n_eq_resource_id='
												+ resourceId, 'screenshotShowDiv'); 
								tableAction
										.init({
											tableId : 'screenshotTable',
											queryUrl : '${contextPath}/Admin-ResScreenShot-show.action?_QUERY_n_eq_resource_id='
													+ resourceId,
											deleteUrl : '${contextPath}/Admin-ResScreenShot-delete.action',
											editUrl : '${contextPath}/Admin-ResScreenShot-showEditForm.action?resourceId='
													+ resourceId,
											deleteBtnId : 'screenshot_del_btn',
											editBtnId : 'screenshot_add_btn',
											areaId : 'screenshotShowDiv'  
										});
						} );
						
					});
</script>
